package com.kotlin.use.api

import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

class APIClient {
    //访问时加载
    private val retrofit by lazy {
        Retrofit.Builder()
            .baseUrl("https://www.wanandroid.com/")
            .addConverterFactory(GsonConverterFactory.create())
            .build()
    }

    val wanAndroidAPI: WanAndroidAPI by lazy {
        retrofit.create(WanAndroidAPI::class.java)
    }
}